package com.eaoa.uc.permission.form;

import org.apache.commons.lang.StringUtils;

import com.eaoa.base.EABaseForm;
import com.eaoa.vo.pub.PubRole;
import com.stony.core.util.CoreUtils;

public class RoleForm extends EABaseForm {

	private String roleno;
	private String rolecode;
	private String rolename;
	private String roledesc;

	public PubRole getVO() {
		PubRole vo = new PubRole();

		if (StringUtils.isNotBlank(this.roleno))
			vo.setRoleno(new Long(this.roleno));
		vo.setRolename(this.rolename);
		vo.setRolecode(this.rolecode);
		vo.setRoledesc(this.roledesc);
		return vo;
	}

	public void setVO(PubRole vo) {
		this.setRoleno(CoreUtils.formatString(vo.getRoleno()));
		this.setRolename(vo.getRolename());
		this.setRolecode(vo.getRolecode());
		this.setRoledesc(vo.getRoledesc());
	}

	public String getRoleno() {
		return roleno;
	}

	public void setRoleno(String roleno) {
		this.roleno = roleno;
	}

	public String getRolecode() {
		return rolecode;
	}

	public void setRolecode(String rolecode) {
		this.rolecode = rolecode;
	}

	public String getRolename() {
		return rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}

	public String getRoledesc() {
		return roledesc;
	}

	public void setRoledesc(String roledesc) {
		this.roledesc = roledesc;
	}

}
